package com.example.mybatisplus.controller;

import com.example.mybatisplus.dao.StaffDao;
import com.example.mybatisplus.pojo.Staff;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@org.springframework.stereotype.Controller
@RequestMapping("/staff")
@CrossOrigin
public class StaffController {

    @Autowired
    private StaffDao staffDao;

    @ResponseBody
    @RequestMapping("/getList")
    public List<Staff> getList(){
        return staffDao.getListAll();
    }
}
